#ifndef MATH_UTILS_H
#define MATH_UTILS_H

#include <cmath>

// Some math utilities - Maybe use GLM? - since we will get for free
// matrix operations, transformations etc...


class Point3f {
public:
    Point3f(float x = 0.0f, float y = 0.0f, float z = 0.0f);
    Point3f operator+(const Point3f &) const;
    Point3f operator-(const Point3f &) const;
    Point3f operator=(const Point3f &pt);
    float* xyz();
    float x, y, z;
    float coord[3];
    // TODO: implement operations as needed
};

class Vector3
{
    public:
    Vector3();
    Vector3(float x, float y, float z);

    Vector3 operator+(Vector3 b);
    void operator=(Vector3 b);
    Vector3 operator-(Vector3 b);
    Point3f operator+(Point3f a);
    Vector3 operator*(float num);

    float dot(Vector3 b);
    Vector3 cross(Vector3 b);
    float getMagnitude();
    void normalize();


    float x, y, z, w;
};

class Matrix4x4 {
public:
    float data[16]; // matrix in column major order(i.e. following opengl scheme)
};


#endif // MATH_UTILS_H
